home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / bluep.swf / scripts / frame_3 / DoAction.as
Text File  |  2013-04-24  |  1KB  |  55 lines

  1. function setup()
  2. {
  3.    killFakePointer();
  4.    _global.preloaderIsGone = false;
  5. }
  6. function run()
  7. {
  8.    mouseCurserAdjust();
  9.    rotateAvatar();
  10.    sendToAds();
  11. }
  12. function rotateAvatar()
  13. {
  14.    var _loc2_ = new Vector();
  15.    _loc2_._x = _xmouse - _root.pointer._x;
  16.    _loc2_._y = _ymouse - _root.pointer._y;
  17.    var _loc3_ = Math.atan2(_loc2_._y,_loc2_._x);
  18.    var _loc4_ = 360 * _loc3_ / 6.283185307179586;
  19.    _root.pointer._rotation = _loc4_;
  20. }
  21. function killFakePointer()
  22. {
  23.    _root.pointer.gotoAndPlay(2);
  24. }
  25. function moveLettersOff(mc, xVal, yVal)
  26. {
  27.    var _loc5_ = xVal;
  28.    var _loc6_ = yVal;
  29.    var _loc3_ = 0.75;
  30.    var _loc4_ = _global.FPSforTweenClass;
  31.    var _loc7_ = mc._x;
  32.    var _loc8_ = mc._y;
  33.    myTweening = new mx.transitions.Tween(mc,"_x",mx.transitions.easing.Strong.easeOut,_loc7_,_loc5_,_loc3_,true);
  34.    myTweening = new mx.transitions.Tween(mc,"_y",mx.transitions.easing.Strong.easeOut,_loc8_,_loc6_,_loc3_,true);
  35.    myTweening.FPS = _loc4_;
  36.    myTweening.FPS = _loc4_;
  37.    myTweening.onMotionFinished = function()
  38.    {
  39.    };
  40. }
  41. function sendToAds()
  42. {
  43.    if(_global.preloaderIsGone)
  44.    {
  45.       _root.gotoAndPlay("logos");
  46.       _global.preloaderIsGone = false;
  47.    }
  48. }
  49. function mouseCurserAdjust()
  50. {
  51.    _root.crosshair._x = _xmouse;
  52.    _root.crosshair._y = _ymouse;
  53. }
  54. stop();
  55.